import apiUrl from '../base'
import axios from '@/libs/axios'
const measurePlan = {
  //查询调度员
  checkDispatch() {
    return axios.get(`${apiUrl.risk}v1/DispatchPost/checkDispatchPostForToken/`)
  },
  //获取机构树
  getOrgTree() {
    return axios.post(`${apiUrl.base}v1/OrgTree/tree/searchEnterpriseAndTeamProjectTree/`)
  },
  //获取项目列表
  getProList(data) {
    return axios.get(`${apiUrl.base}v1/Project/getByOrgTreeObjectId/`+data)
  },
  //获取风险单列表
  getRiskList(data) {
    return axios.post(`${apiUrl.risk}v1/RiskOrder/list`,data)
  },
  //获取风险详情
  getRiskDetail(data) {
    return axios.get(`${apiUrl.risk}v1/RiskOrder/detail/`+data)
  },
  //获取措施详情
  getMeasuresList(id){
    return axios.get(`${apiUrl.risk}v1/Measures/list/`+id)
  },
  //撤销
  revoke(id){
    return axios.get(`${apiUrl.risk}v1/Measures/revoke/`+id)
  },
  //获取措施详情
  getRecord(id){
    return axios.get(`${apiUrl.risk}v1/Measures/record/`+id)
  },
  //匹配方案
  matchingMeasuresList(id){
    return axios.get(`${apiUrl.risk}v1/Measures/matchingMeasuresList/`+id)
  },
  getTree(){
    return axios.post(`${apiUrl.base}v1/OrgTree/tree/currentTree`)
  },
  getApprovalConfig(){
    return axios.get(`${apiUrl.risk}v1/ApprovalConfig/listForToken`)
  },
  saveApprovalConfig(data){
    return axios.post(`${apiUrl.risk}v1/ApprovalConfig/save`,data)
  },
  //获取风险等级
  getFrequency(){
    return axios.post(`${apiUrl.risk}v1/Frequency/list`)
  },
  //提交措施方案
  submitMeasure(data){
    return axios.post(`${apiUrl.risk}v1/Measures/submitMeasures`,data)
  },
  //审核
  riskProcessHandleExamine(data){
    return axios.post(`${apiUrl.risk}v1/Measures/riskProcessHandleExamine`,data)
  },
  //签发
  riskProcessHandleIssue(data){
    return axios.post(`${apiUrl.risk}v1/Measures/riskProcessHandleIssue`,data)
  }
};
export default measurePlan
